
<?php $__env->startSection('title', '角色列表'); ?>

<?php $__env->startSection('css'); ?>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-header">
                    <form class="pull-left search-bar" method="post" action="<?php echo e(url('admin/role/index')); ?>">
                        <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>"/>
                        <div class="col-xs-3 m-t-10">
                            <div class="input-group">
                                <span class="input-group-addon" id="basic-addon1">角色名称</span>
                                <input type="text" class="form-control" name="keyword" placeholder="请输入角色名称" aria-describedby="basic-addon1" value="<?php if(!empty($params['keyword'])){ ?><?php echo e($params['keyword']); ?><?php }?>">
                            </div>
                        </div>
                        <div class="col-xs-3 m-t-10 pull-left">
                            <div class="input-group">
                                <button class="btn btn-info btn-w-xs m-r-10" type="submit">查询</button>
                                <button class="btn btn-secondary btn-w-xs m-r-10 reset-btn" type="button">重置</button>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="card-toolbar clearfix">
                    <?php if(in_array('role_add',Session::get('role_menu_action'))){ ?>
                    <div class="toolbar-btn-action">
                        <a class="btn btn-primary m-r-5" href="<?php echo e(url('admin/role/add')); ?>"><i class="mdi mdi-plus"></i> 新增</a>
                    </div>
                    <?php } ?>
                </div>
                <div class="card-body">
                    <div class="table-responsive">
                        <table class="table table-bordered table-hover table-striped">
                            <thead>
                            <tr>
                                <th style="width: 50px;">
                                    <label class="lyear-checkbox checkbox-primary">
                                        <input type="checkbox" id="check-all"><span></span>
                                    </label>
                                </th>
                                <th width="20%">角色名称</th>
                                <th width="30%">描述</th>
                                <th width="15%">创建时间</th>
                                <th width="15%">更新时间</th>
                                <th width="15%">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php if(count($list) > 0): ?>
                                <?php $__currentLoopData = $list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $k=>$v): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td>
                                            <?php if($v->id != 1): ?>
                                            <label class="lyear-checkbox checkbox-primary">
                                                <input type="checkbox" name="ids[]" value="<?php echo e($v->id); ?>"><span></span>
                                            </label>
                                            <?php endif; ?>
                                        </td>
                                        <td><?php echo e($v->role_name); ?></td>
                                        <td><?php echo e($v->remark); ?></td>
                                        <td>
                                            <?php if(!empty($v->create_time)): ?>
                                                <?php echo date('Y-m-d H:i:s',$v->create_time)?>
                                            <?php endif; ?>
                                        </td>
                                        <td>
                                            <?php if(!empty($v->update_time)): ?>
                                                <?php echo date('Y-m-d H:i:s',$v->update_time)?>
                                            <?php endif; ?>
                                        </td>
                                        <td>
                                            <div class="btn-group">
                                                <?php if($v->id != 1): ?>
                                                    <?php if(in_array('role_edit',Session::get('role_menu_action'))){ ?>
                                                    <a class="btn btn-xs btn-default m-r-5" href="<?php echo e(route('admin.role.edit', ['id'=>$v->id])); ?>" data-toggle="tooltip" data-original-title="编辑"><i class="mdi mdi-pencil"></i></a>
                                                    <?php } ?>
                                                    <?php if(in_array('role_delete',Session::get('role_menu_action'))){ ?>
                                                    <a class="btn btn-xs btn-default m-r-5 del-btn" data-href="<?php echo e(route('admin.role.delete')); ?>" data-confirm="确定删除角色?" data-id="<?php echo e($v->id); ?>" title="" data-toggle="tooltip" data-original-title="删除"><i class="mdi mdi-delete"></i></a>
                                                    <?php } ?>
                                                <?php endif; ?>
                                            </div>
                                        </td>
                                    </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <?php else: ?>
                                <tr>
                                    <td colspan="6" style="text-align: center;color:#ff0000;">查询数据不存在！</td>
                                </tr>
                            <?php endif; ?>
                            </tbody>
                        </table>
                    </div>
                    <?php echo $pager; ?>

                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('js'); ?>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.public.layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\phpstudy_8.1\WWW\my_admin\resources\views/admin/role/index.blade.php ENDPATH**/ ?>